<template>
  {{ temp }}
  <Sun />
</template>

<script setup lang="ts">
import Sun from "./Sun.vue";
import { inject, ref } from "vue";
let temp = ref<number>(0);
// 注入
const provideState: any = inject("provideState");

temp.value = provideState.num;
</script>
